/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: EditGuidelineEvent.java
 * Date: 20/01/2011
 */

package com.ingenius.sau.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.ingenius.sau.client.event.EditGuidelineEvent.EditGuidelineEventHandler;

/**
 * Class <strong>EditGuidelineEvent</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class EditGuidelineEvent extends GwtEvent<EditGuidelineEventHandler> {

	public interface EditGuidelineEventHandler extends EventHandler {

		void onEditGuideline(EditGuidelineEvent event);
	}

	public static Type<EditGuidelineEventHandler> TYPE = new Type<EditGuidelineEventHandler>();

	private final String guidelineId;

	public EditGuidelineEvent(String guidelineId) {
		this.guidelineId = guidelineId;
	}

	public String getGuidelineId() {
		return guidelineId;
	}

	@Override
	public Type<EditGuidelineEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditGuidelineEventHandler handler) {
		handler.onEditGuideline(this);
	}

}
